#pragma once
#include <cocos2d.h>
#include <tcCommon/tc_common.h>

using namespace cocos2d;

class GunsightSprite : public CCSprite
{
public:
	void initGunsight();
	void setPowerupMode(bool mode);
private:
	CCSprite mPowerupSprite;
};

class ChessmanSprite : public CCSprite
{
public:
	ChessmanSprite();
	~ChessmanSprite();

	void init(int id, tcType image);
	void update();
	void reset();

	CCSprite* getGunsightSprite();
	
private:
	void updateSize();
	void updatePosition();
	void updateOwner();
	void updateGunsight();
	void updateDead();

private:
	int mChessmanID;
	CCSprite mImageSprite;
	GunsightSprite mGunsightSprite;

	CCPoint mInitPosition;
	
	CCTexture2D mRedTexture;
	CCTexture2D mGreenTexture;

	bool mDeadAnimationDone;
};